import request from "@/utils/request";

// 查询巡检配置列表
export function listConfig(query) {
  return request({
    url: "/ctnm-ly/config/list",
    method: "get",
    params: query,
  });
}

// 查询巡检配置详细
export function getConfig(examineConfigId) {
  return request({
    url: "/ctnm-ly/config/" + examineConfigId,
    method: "get",
  });
}

// 新增巡检配置
export function addConfig(data) {
  return request({
    url: "/ctnm-ly/config",
    method: "post",
    data: data,
  });
}

// 修改巡检配置
export function updateConfig(data) {
  return request({
    url: "/ctnm-ly/config",
    method: "put",
    data: data,
  });
}

// 删除巡检配置
export function delConfig(examineConfigId) {
  return request({
    url: "/ctnm-ly/config/" + examineConfigId,
    method: "delete",
  });
}

// 获取所有企业·项目
export function getAllGroupAndProjectApi() {
  return request({
    method: "get",
    url: "/ctnm-ly/config/selectAll",
  });
}
